﻿using GroceryList.Domain.Model.Product;
using GroceryList.Model;
using NHibernate.Mapping.ByCode;
using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Type;

namespace GroceryList.Domain.Mapping
{
    public class ProductoMap:ClassMapping<Producto>
    {
        public ProductoMap()
        {
            Id(
                "Id",
                ma =>
                {
                    ma.Type(new GuidType());
                    ma.Column("Id");
                    ma.Generator(new GuidGeneratorDef());
                });

            Property(pr=>pr.Nombre);
        }
    }
}